import matplotlib.pyplot as plt

# 假设这是两个模型每轮训练后的准确率数据
epochs = range(1, 11)
model1_accuracies = [0.65, 0.70, 0.75, 0.80, 0.83, 0.85, 0.87, 0.89, 0.90, 0.91]
model2_accuracies = [0.68, 0.72, 0.76, 0.79, 0.82, 0.84, 0.86, 0.88, 0.90, 0.91]

plt.figure(figsize=(10, 5))
plt.plot(epochs, model1_accuracies, label='Model 1', marker='o')
plt.plot(epochs, model2_accuracies, label='Model 2', marker='x')

plt.title('Comparison of Model Accuracy over Epochs')
plt.xlabel('Epochs')
plt.ylabel('Accuracy')
plt.legend()
plt.grid(True)
plt.show()